BaseFile

abstract class BaseFile(var fileName: String?, var fileSize: Long? = null, var downloadUrl: String? = null, var preview: ByteArray? = null, var data: ByteArray? = null)

Base class for file attachments exchanged in the conversation.

Inheritors

Constructors

Link copied to clipboard
constructor(fileName: String?, fileSize: Long? = null, downloadUrl: String? = null, preview: ByteArray? = null, data: ByteArray? = null)

Properties

Link copied to clipboard

The file content, or null if the file hasn't been downloaded. Always null for received videos, which are streamed from downloadUrl instead of downloaded.

Link copied to clipboard

The URL the file can be downloaded from, or null if not available.

Link copied to clipboard

The name of the file, including its extension, or null if unknown.

Link copied to clipboard

The size of the file in bytes, or null if unknown.

Link copied to clipboard

The type of the file, determined from the extension of fileName.

Link copied to clipboard

Preview image bytes: the image itself for image files, or a frame extracted from the video for video files. null if no preview is available.